from django.core.management.base import BaseCommand

from agent.twitter_agent import read_messages
import time

class Command(BaseCommand):
    help = "Script para hacer auto follow a los usuarios que nos siguen en twitter"
    
    requires_model_validation = True
    
    def handle(self, *app_labels, **options):
        while (1):
            try:
                read_messages()
            except:
                pass
            time.sleep(20)